<extend name="./Common/View/Public/form.html" />
<block name="page_title">编辑部门</block>
<block name="main">
        <form class="layui-form" method="post" action="base/department/update" lay-filter="pageForm">
            <input type="hidden" value="{$data.id}" name="id" />
            <div class="layui-form-item">
                <label class="layui-form-label">上级部门</label>
                <div class="layui-input-block">
                    <select name="pid" id="pid" lay-filter="pid" value="{$data.pid}" tree="base/Department/tree" empty="顶级部门">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="title" maxlength="50" minlength="1" value="{$data.title}" required lay-verify="required|length" placeholder="请输入部门名称" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">1-10个英文或汉字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门类型</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('DEPARTMENT_TYPE','type',$data['type']))}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门状态</label>
                <div class="layui-input-block">
                    {:W('Todo/Dict/radio',array('STATUS','status',$data['status']))}
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">展示排序</label>
                <div class="layui-input-inline">
                    <input type="number" name="sort" required lay-verify="required|int" value="{$data.sort}" autocomplete="off" class="layui-input" />
                </div>
                <div class="layui-form-mid layui-word-aux">从小到大排序</div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">负责人工号</label>
                <div class="layui-input-block">
                    <input type="text" name="master" maxlength="20" value="{$data.number}" lay-verify="length" placeholder="请输入部门负责人工号" autocomplete="off" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="pageForm">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </block>